*** Settings ***
Library           Selenium2Library
Library           SeleniumLibrary
Library           Collections
Resource          业务关键字.txt

*** Variables ***
${name}           Hello World

*** Test Cases ***
test1
    [Tags]    smokes
    Comment    1、打印
    Log    Hello World!
    Comment    2、设置变量
    ${a}    Set Variable    100
    Log    ${a}
    Comment    3、获得系统时间
    ${time}    Get Time
    Log    ${time}
    Comment    4、字符串的拼接
    ${str}    Catenate    mysql    oracle    db2
    Log    ${str}
    Comment    5、创建列表
    ${list}    Create List    功能测试    性能测试    自动化测试
    Log    ${list}
    @{list}    Create List    功能测试    性能测试    自动化测试
    Log Many    @{list}
    Comment    6、创建字典
    ${dict}    Create Dictionary    id=1001    name=张飞
    Log    ${dict}
    ${keys}    Get Dictionary Keys    ${dict}
    Log    ${keys}
    ${values}    Get Dictionary Values    ${dict}
    Log    ${values}
    Comment    7、流程控制if
    ${age}    Set Variable    20
    Run Keyword If    ${age}>45    Log    大了
    ...    ELSE IF    18<${age}<21    业务关键字一
    ...    ELSE    Log    小了
    Comment    8、循环语句for
    FOR    ${i}    IN    mysql    oracle    db2
        Log    ${i}
    END
    @{list}    Create List    mysql    oracle    db2
    FOR    ${x}    IN    @{list}
        Log    ${x}
    END
    FOR    ${i}    IN RANGE    1    6
        Log    ${i}
        Run Keyword If    ${i}==3    Exit For Loop
    END

test2
    open

test3
